<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <h2>call,apply,bind区别</h2>
</body>
<script>
    var name = '张三'

    const obj = {
        name: '李四'
    }

    function getUser(name, age) {
        console.log(name)
        console.log(age)
        this.name = name;
        console.log(this.name)
    }

    // getUser.call(obj, '王五', 20)
    // getUser.apply(obj, ['王五11', 20])
    getUser.bind(obj)('王五111', 20)
</script>

</html>